package com.dly.hope.modle;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * 成员信息接受表
 */
@Entity
@Table(name = "hope013_websocket_member_message")
@DynamicInsert
@DynamicUpdate

@Data
@NoArgsConstructor
@AllArgsConstructor
public class WebSocketMemberMessage {

    @Id
    @Column(name = "id")
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
    private String id;

    @Column(name = "group_id")
    @Comment(value = "群组")
    private String groupId;

    @Column(name = "accept_id")
    @Comment(value = "接收人")
    private String acceptId;

    @Column(name = "webSocket_message_id")
    @Comment(value = "接收人")
    private String webSocketMessageId;

    @Column(name = "is_read")
    @Comment(value = "是否已读")
    private Boolean isRead = Boolean.FALSE;
}
